<div style="background-color:#8B7550;height:100px;color:white;font-size:38px;padding:10px;">

Startupindex הוא אינדקס המרכז את כל החברות הישראליות במגזר הטכנולוגי.

</div>

<div style="background-color:#F4F0ED;font-size:18px;color:black;border-bottom:1px solid #D9D7C8;padding:10px;">

<a href="/signup"><img src="/images/joinbutton.png"></a>

</div>


<?php 	if ($this->getContext()->getUser()->isAuthenticated()) { ?>
<?php echo link_to('<img src="/images/icons/add.png"> Add a new company','/newcompany');?><br>

<?php } ?>

<style>

body{
background:white;

}
</style> 
<br>

<div id="up" style="width:100%;height:40px;font-size:14px;color:black">
Index: <?php $alphas = range('A', 'Z');

foreach ($alphas as $alpha) {

echo '<a href="#'.$alpha.'">'.$alpha.'</a> | ';

}

?>


</div>

<?php 
$letterarray = array();
$counter = ''; 
$firstletter = '';
$breaktr = '';
foreach ($pager->getResults() as $company) {

$companyletter = ucfirst(substr($company->getName(), 0, 1)); 

$counter++;
if ($counter == 0) { $firstletter = $companyletter;

$letterarray[] = $companyletter;

}
$breaktr++

?>

<?php if ($companyletter != $firstletter ) {

$letterarray[] = $companyletter;


?>
<table dir="rtl" border='0' width="100%">
<tr>
<td colspan="2" dir="ltr" style="font-size:18px;color:black;width:100%;border-bottom:1px solid #DFDFDF;">
 <?php echo '<a name="'.$companyletter.'">'.$companyletter.'</a>'; $firstletter = $companyletter; ?>
 <a href="#up"><small><img width="12" height="12" src="/images/icons/arrow_up.png"></small></a></td>
</td>

</tr>
<tr>
<?php }?>

<td>

 <div style="text-align:right;width:460px;background-color:white;border:1px solid #DFDFDF;">
		
<div style="background-color:#f2f1ed;padding-right:5px;padding:3px;" dir="ltr"> <?php 	if ($this->getContext()->getUser()->isAuthenticated()) { ?>
<?php if ($company->getPublishState() == 'draft') {?> <small><?php echo $company->getPublishState();?></small><?php }?>

<?php echo link_to(' <img src="/images/icons/pencil.png">','/editcompany/'.$company->getId());?>
<?php }?> <span style="font-size:18px;color:black"><?php echo $company->getName(); ?></span> </div>	


<div style="padding:15px;float:right;width:112px;height:75px;margin:10px;border-left:1px solid silver;padding:10px;padding-left:5px;">
<div style="width:112px;height:75px;background-repeat:no-repeat;background-position:center;background-image:url('<?php echo $company->getLogoUrl(); ?>');">
</div>

</div>

<div style="background-color:white;font-size:11px;color:#000;padding-left:10px;height:130px;width:385px;text-align:right;padding-top:10px;" dir="rtl">

<table>
<?php if($company->getUrl()):?>

<tr>
<td width="85">

אתר:


</td>

<td>
<span style="font-weight:bold">

<a href="<?php echo $company->getUrl(); ?>"><?php echo $company->getUrl();?></a> <br>
</span>
</td>

</tr>
<?php endif;?>

<?php if($company->getLocation()):?>

<tr>
<td>

מיקום:

</td>
<td>
<span style="font-weight:bold">

<?php echo $company->getLocation(); ?> <br>	
</span>

</td>
</tr>
<?php endif;?>
<?php if($company->getFounded()):?>

<tr>
<td>
הקמה:

</td>

<td>
<span style="font-weight:bold">

<?php echo $company->getFounded(); ?> <br>	
</span>

</td>

</tr>
<?php endif;?>
<?php if($company->getRounds()):?>

<tr>
<td>
סבב גיוס:
</td>

<td>
<span style="font-weight:bold">

<?php echo $company->getRounds(); ?><br>
</span>

</td>

</tr>
<?php endif;?>

<?php if($company->getFounders()):?>
<tr>
<td>
יזמים:
</td>

<td>
<span style="font-weight:bold">

<?php echo $company->getFounders(); ?><br>
</span>

</td>
</tr>

<?php endif;?>



<?php if($company->getTwitterUser()):?>
<tr>
<td>
טוויטר:
</td>

<td>
<span style="font-weight:bold">

<a href="http://www.twitter.co.il/<?php echo $company->getTwitterUser(); ?>"><?php echo $company->getTwitterUser(); ?></a><br>
</span>

</td>
</tr>

<?php endif;?>





<?php if($company->getBlogUrl()):?>
<tr>
<td>
בלוג:
</td>

<td>
<span style="font-weight:bold">

<a href="<?php echo $company->getBlogUrl(); ?>"><?php echo $company->getBlogUrl(); ?></a><br>
</span>

</td>
</tr>

<?php endif;?>




</table>
</div>

<br>


<div style="padding:15px;background-color:white;font-size:11px;color:#000;padding-left:10px;height:50px;padding-top:10px;" dir="rtl">

<?php echo $company->getDescription(); ?> <br>		
</div>


</div>
</td>

<?php if ($breaktr > 2) { echo '</tr><tr>'; $breaktr = '';}?>



<?php } ?>


<?php if ($this->getContext()->getUser()->isAuthenticated()) { ?>

<table><tr><td><span style="font-size:18px;color:black">Drafts</span></td></tr></table>

<?php 
$letterarray = array();
$counter = ''; 
$firstletter = '';
$breaktr = '';
foreach ($pagerdraft->getResults() as $company) {

$companyletter = ucfirst(substr($company->getName(), 0, 1)); 

$counter++;
if ($counter == 0) { $firstletter = $companyletter;

$letterarray[] = $companyletter;

}
$breaktr++

?>

<?php if ($companyletter != $firstletter ) {

$letterarray[] = $companyletter;


?>
<table dir="rtl" border='0' width="100%">
<tr>
<td colspan="2" style="font-size:18px;color:black;width:100%;border-bottom:2px solid silver;">
 <?php echo '<a name="'.$companyletter.'">'.$companyletter.'</a>'; $firstletter = $companyletter; ?>
 <a href="#up"><small><img width="12" height="12" src="/images/icons/arrow_up.png"></small></a> </td>
</tr>
<tr>
<?php }?>

<td>

 <div style="text-align:right;width:460px;background-color:white">
		
<div style="background-color:#f2f1ed;padding-right:5px;padding:3px;" dir="ltr"> <?php 	if ($this->getContext()->getUser()->isAuthenticated()) { ?>
<?php if ($company->getPublishState() == 'draft') {?> <small><?php echo $company->getPublishState();?></small><?php }?>

<?php echo link_to(' <img src="/images/icons/pencil.png">','/editcompany/'.$company->getId());?>
<?php }?> <span style="font-size:18px;color:black"><?php echo $company->getName(); ?></span> </div>	


<div style="padding:15px;float:right;width:112px;height:75px;margin:10px;border-left:1px solid silver;padding:10px;padding-left:5px;">
<div style="width:112px;height:75px;background-repeat:no-repeat;background-position:center;background-image:url('<?php echo $company->getLogoUrl(); ?>');">
</div>

</div>

<div style="background-color:white;font-size:11px;color:#000;padding-left:10px;height:130px;width:385px;text-align:right;padding-top:10px;" dir="rtl">

<table>
<?php if($company->getUrl()):?>

<tr>
<td width="85">

אתר:


</td>

<td>
<span style="font-weight:bold">

<a href="<?php echo $company->getUrl(); ?>"><?php echo $company->getUrl();?></a> <br>
</span>
</td>

</tr>
<?php endif;?>

<?php if($company->getLocation()):?>

<tr>
<td>

מיקום:

</td>
<td>
<span style="font-weight:bold">

<?php echo $company->getLocation(); ?> <br>	
</span>

</td>
</tr>
<?php endif;?>
<?php if($company->getFounded()):?>

<tr>
<td>
הקמה:

</td>

<td>
<span style="font-weight:bold">

<?php echo $company->getFounded(); ?> <br>	
</span>

</td>

</tr>
<?php endif;?>
<?php if($company->getRounds()):?>

<tr>
<td>
סבב גיוס:
</td>

<td>
<span style="font-weight:bold">

<?php echo $company->getRounds(); ?><br>
</span>

</td>

</tr>
<?php endif;?>

<?php if($company->getFounders()):?>
<tr>
<td>
יזמים:
</td>

<td>
<span style="font-weight:bold">

<?php echo $company->getFounders(); ?><br>
</span>

</td>
</tr>

<?php endif;?>



<?php if($company->getTwitterUser()):?>
<tr>
<td>
טוויטר:
</td>

<td>
<span style="font-weight:bold">

<a href="http://www.twitter.co.il/<?php echo $company->getTwitterUser(); ?>"><?php echo $company->getTwitterUser(); ?></a><br>
</span>

</td>
</tr>

<?php endif;?>





<?php if($company->getBlogUrl()):?>
<tr>
<td>
בלוג:
</td>

<td>
<span style="font-weight:bold">

<a href="<?php echo $company->getBlogUrl(); ?>"><?php echo $company->getBlogUrl(); ?></a><br>
</span>

</td>
</tr>

<?php endif;?>




</table>
</div>

<br>


<div style="padding:15px;background-color:white;font-size:11px;color:#000;padding-left:10px;height:50px;padding-top:10px;" dir="rtl">

<?php echo $company->getDescription(); ?> <br>		
</div>


</div>
</td>

<?php if ($breaktr > 2) { echo '</tr><tr>'; $breaktr = '';}?>

<?php if ($companyletter != $firstletter) {?>
</table>
<?php }?>

<?php } ?>

<?php }?>

